<%=render :partial => "/frame_top" %>
	<h1 class="title_header">Import events from facebook</h1>
	<br /><br />
	<% for i in @events%>
		<div style="width:200px" class="left">			 
			<% if(@eids[i.eid.to_s]) %>
			<a href="/events/view/<%= @eids[i.eid.to_s] %>" style="display:block;text-align:center;">view it!</a>
			<% else %>
			<a href="/events/new?eid=<%= i.eid %>" style="display:block;text-align:center;">import it!</a>
			<% end %>
			<img src="<%= i.pic_big %>" alt="" style="width:200px;margin-top:2px;" />						
		</div>
		<div class="left" style="margin-left:20px;width:440px;overflow:hidden;">		
			<span class="title_div"><%= i.name %></span><br /><br />		
			<span class="title_field">description</span>
			<%= i.description %><br /><br />
			<span class="title_field">tags: </span><%= i.event_type%>,<%= i.event_subtype%><br /><br />
			<%time_start = (Time.now + (i.start_time.to_i - Time.now.utc.to_i).seconds) - 9.hours
				time_end =  Time.now + (i.end_time.to_i - Time.now.utc.to_i).seconds - 9.hours
				time_end -= 1.day if time_end.hour < 7 %>
			<span class="title_field">date start: </span><%= time_start.to_date %> <br /><br />	
			<% if time_end.to_date > time_start.to_date %>
			<span class="title_field">date end: </span><%= time_end.to_date %><br /><br />
			<% end %>
			<span class="title_field">place name: </span><%= i.location %><br /><br />
			<span class="title_field">place address: </span><%= i.venue['street'].to_s + " " + i.venue['city'].to_s + " " +
						i.venue['state'].to_s + " " + i.venue['country'].to_s %>
		</div>
		<div class="separator" style="height:50px;"><span></span></div>
	<% end %>
<%=render :partial => "/frame_bottom" %>